# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-deprecated
pkgver=1.2.14
pkgrel=3
pkgdesc="@deprecated decorator to deprecate old python classes, functions or methods."
url="https://github.com/tantale/deprecated"
arch="noarch"
license="MIT"
depends="py3-wrapt<2"
makedepends="py3-setuptools py3-gpep517 py3-installer py3-wheel"
checkdepends="py3-pytest py3-pytest-cov"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/tantale/deprecated/archive/v$pkgver.tar.gz"
builddir="$srcdir/deprecated-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
dcf741dd9c237e461d700ada6ed12d048e953c0dd9ad9c9e8301dbec3f45ba70385d4e70337934fd8bcece4899e806a05202d8a90a030171279468ba86b95d2b  py3-deprecated-1.2.14.tar.gz
"
